package com.stylefeng.guns.modular.vpn.utils;

/**
 * @Description TODO
 * @Author Mr.GodRui
 * @Date 2020-04-20 15:19
 **/
public class AnalyzeUtil {
    /**
     * 修改数组内容，逐次累计
     * @param array
     * @return
     */
    public static Integer[] getSumArray(Integer[] array){
        Integer[] sumArray = new Integer[array.length];
        int len = array.length;
        for (int i = 0; i < len; i++) {
            if(i == 0){
                sumArray[i] =  array[i];
            }else{

                sumArray[i] = sumArray[i-1] + array[i];
            }
        }
        return sumArray;
    }
}
